using System.Collections.Generic;
using System.Text;

namespace SimpleOrmCFPC.Core.Query.expressions.ExprssionCompilers
{
    public class ConstantWhereElement : IWhereElement
    {
        public ConstantWhereElement(object value)
        {
            Value = value;
        }

        public void Visit(WhereToSqlBuilder visitor, StringBuilder builder, List<object> parameters)
        {
            builder.Append("?");
            parameters.Add(Value);
        }

        public object Value { get; set; }
    }
}